package plp.functional2.expression;

import java.util.HashMap;
import plp.expressions1.util.Tipo;
import plp.expressions2.expression.Valor;
import plp.expressions2.expression.ValorConcreto;
import plp.expressions2.memory.AmbienteCompilacao;
import plp.expressions2.memory.VariavelJaDeclaradaException;
import plp.expressions2.memory.VariavelNaoDeclaradaException;

public class ValorMapEntry extends ValorConcreto<HashMap<Valor,Valor>>{

	public ValorMapEntry(HashMap<Valor,Valor> map) {
		super(map);
	}

	public Tipo getTipo(AmbienteCompilacao amb)
			throws VariavelNaoDeclaradaException, VariavelJaDeclaradaException {
		// TODO Auto-generated method stub
		return Tipo.TIPO_MAP_ENTRY;
	}
	
	public Valor getKey() {
		return (Valor) valor().keySet().iterator().next();
	}
	
	public Valor getValue() {
		return (Valor) valor().values().iterator().next();
	}

}
